package com.colorlight.cloud.complete.api;

import com.colorlight.cloud.all_event.AllProtocolType;
import com.colorlight.cloud.complete.entity.enumerate.NameStruct;
import com.colorlight.cloud.gateway.api.message.constraint.schedule.ScheduleActions;
import com.colorlight.cloud.gateway.api.message.model.Msg;
import com.colorlight.cloud.gateway.api.message.process.ProcessMessageEventHandler;


/**
 * @author Demon
 * @date 20/1/2024  下午2:28
 */
public interface CompleteProcessMessageEventHandler<K extends ScheduleActions> extends ProcessMessageEventHandler<K> {
	
	
	/**
	 * 协议层面的区分
	 *
	 * @return 协议名
	 * @author Demon
	 **/
	@Override
	default String getProtocolType() {
		return AllProtocolType.NAME_STRUCT_COMPLETE.getType();
	}
	
	/**
	 * 获取该接口实现对应的指令枚举
	 *
	 * @return 指令枚举
	 */
	@Override
	NameStruct getInstructionType();
	
	/**
	 * 整个协议不需要这个
	 *
	 * @param deviceName device
	 * @param msg        消息实体
	 * @return
	 * @author Demon
	 * @date 17/5/2024/上午11:32
	 **/
	@Override
	default void accept(String deviceName, Msg<K> msg) {
		accept(deviceName, null, msg);
	}
	
}
